package com.github.service.cms;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.dao.cms.RoleDAO;
import com.github.module.cms.Role;

/**
 * <p>User: Mu Yunlong
 * <p>Date: 2016年2月15日 下午12:18:47
 * <p>Version: 1.0
 */
@Service
public class RoleService {

    @Autowired
    RoleDAO roleDAO;
    
    public List<Role> findAllRoles() {
        return roleDAO.getRoleList();
    }
    public Role findById(long id) {
        return roleDAO.findRoleById(id);
    }
    public void deleteRoleById(long id) {
        roleDAO.deleteRoleById(id);
    }
    public void deleteAllRoles() {
        
    }
    public void updateRole(Role role) {
         roleDAO.updateRole(role);
    }

    public void saveRole(Role role) {
        roleDAO.insertRole(role);
    }

    public boolean isRoleExist(Role role) {
        // TODO Auto-generated method stub
        return false;
    }

}
